import Vue from 'vue'
import util from '@/libs/util'
import Router from 'vue-router'
import iview from 'iview'
import routes from './routes'
import store from '../store'

Vue.use(Router)

const router = new Router({
  // mode: 'history',
  base: process.env.BASE_URL,
  routes
})

// 路由前置钩子
router.beforeEach((to, form, next) => {
  next()
})

export default router
